package com.lucaswangdev.strategy;

import com.lucaswangdev.Entity;

import java.util.Arrays;
import java.util.List;

public class ModifyRemarkStrategy implements ChangeStrategy {

    @Override
    public boolean hasChanged(Entity requestEntity, Entity dbEntity) {
        return !requestEntity.getRemark().equals(dbEntity.getRemark());
    }

    @Override
    public void handleChange() {
        // 模拟生成并发送消息的必要参数
        String secret = "adminSecret";
        String token = "adminToken";
        List<String> userList = Arrays.asList("admin1", "admin2");
        String messageContent = "Remark has been updated.";

        // 打印消息内容（模拟发送）
        System.out.printf("===> Sending message to %s with content: %s%n", userList, messageContent);
    }
}
